Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Node / ReticulumProjects / MeshChatX.git / files / scripts / repository_http_server.py

Displaying Raw • Download


scripts/repository_http_server.py e363738a9284a48fe4533cc68684dbe9db4803fe (e363738a) Text, 431 B

T8b949e#!/usr/bin/env python3
T8b949e# SPDX-License-Identifier: 0BSD
T8b949e"""CLI wrapper: plain HTTP file server for a MeshChatX repository-server directory."""

Tff7b72import T7ee787sys
Tff7b72from T7ee787pathlib Tff7b72import Te6edf3Path

Te6edf3_repo_root Tff7b72= Te6edf3PathTb4b4b4(Tff7b72__file__Tb4b4b4)Tff7b72.Td2a8ffresolveTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffparentsTb4b4b4[T79c0ff1Tb4b4b4]
Tff7b72if Tffa657strTb4b4b4(Te6edf3_repo_rootTb4b4b4) Tff7b72not Tff7b72in Te6edf3sysTff7b72.Td2a8ffpathTb4b4b4:
Te6edf3sysTff7b72.Td2a8ffpathTff7b72.Td2a8ffinsertTb4b4b4(T79c0ff0Tb4b4b4, Tffa657strTb4b4b4(Te6edf3_repo_rootTb4b4b4)Tb4b4b4)

Tff7b72from T7ee787meshchatxT7ee787.T7ee787repository_http_standalone Tff7b72import Te6edf3main T8b949e# noqa: E402

Tff7b72if Tff7b72__name__ Tff7b72== Ta5d6ff"Ta5d6ff__main__Ta5d6ff"Tb4b4b4:
Tff7b72raise Tf85149SystemExitTb4b4b4(Te6edf3mainTb4b4b4(Tb4b4b4)Tb4b4b4)


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────